package cn.ptu.pmaa.mapper;

import cn.ptu.pmaa.entities.Admin;
import cn.ptu.pmaa.entities.FeedBack;
import cn.ptu.pmaa.entities.Student;
import cn.ptu.pmaa.entities.Teacher;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface UserMapper {

    @Select("select * from admin where adminid=#{id}")
    public Admin getAdminInfo(@Param("id") String id);

    @Select("select * from teacher where teacherid=#{id}")
    public Teacher getTeacherInfo(@Param("id") String id);

    @Select("select * from student where studentid=#{id}")
    public Student getStudentInfo(@Param("id") String id);

    @Insert("INSERT INTO feedback(fknr,fktjsj,fktjrid) VALUES(#{fknr},#{fktjsj},#{fktjrid})")
    public int uploadBack(FeedBack feedBack);

}
